<?php
/**
 * Created by PhpStorm.
 * User: zhangjian37
 * Date: 2016/9/16
 * Time: 21:40
 */

$RootDir = $_SERVER['DOCUMENT_ROOT'];
include $RootDir . '/utils/mysql/MysqlUtils.php';
include $RootDir . '/utils/CommonConstant.php';

//通过user_name得到手机，邮箱，密保
$user_name = $_POST['user_name'];
$phone = $_POST['phone'];
$check = $_POST['check'];

$conn = conn_mysql();
if($type == 0){
    $query = "select phone_num from user_info WHERE user_name = '$user_name' limit 1";
    $result = queryRecord($query,$conn);
    while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) {
        $phone_num = $row['phone_num'];
    }
    if ($phone_num != null)echo $phone_num;
    else die('err: 用户名不存在');
}